package com.ys.enume.advanced;

/**
 * @EnumName   亚马逊销售伙伴campaignStatus
 * @Description TODO
 * @Author alula
 * @Date 2023-12-01 15:45
 */
public enum CampaignStatusEnum {
    /**
     * 启用
     */
    ENABLED("ENABLED", "启用"),
    /**
     * 暂停
     */
    PAUSED("PAUSED", "暂停"),
    /**
     * 存档
     */
    ARCHIVED("ARCHIVED", "存档"),
    ;

    private final String code;

    private final String name;

    CampaignStatusEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static CampaignStatusEnum getEnumByCode(String code) {
        for (CampaignStatusEnum marketplaceEnum : values()) {
            if (marketplaceEnum.getCode().equalsIgnoreCase(code)) {
                return marketplaceEnum;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

}
